//
//  CYDataManager.h
//  CaiYun
//
//  Created by 今日信息科技 on 2017/8/11.
//  Copyright © 2017年 今日信息科技. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef enum{
    DocumentsPath,
    CachesPath,
    PreferencesPath,
    TmpPath
}SandboxPath;
@interface CYCache : NSObject
+ (NSString *)getDocumentPath;
+ (NSString *)getCachesPath;
+ (NSString *)getPreferencesPath;
+ (NSString *)getTmpPath;
+ (NSString *)getIP;
/**
 *@pragma NSUserDefaults保存token到偏好设置Preferences
 */
+ (void)saveData:(id)data forKey:(NSString *)key synchronize:(BOOL)isSynchronize;
/**
 *@pragma NSUserDefaults读取数据
 */
+ (id)readDataWithKey:(NSString*)key;
/**
 *@pragma NSUserDefaults删除数据
 */
+ (void)deleteDataWithKey:(NSString *)key;
/**
 *@pragma 保存plist到caches
 */
+ (BOOL)cache:(id)data plist:(NSString*)plist;
/**
 *@pragma 从caches->plist读取数据
 */
+ (id)getCache:(NSString *)plist;
/**
 *@pragma 数值转换成时间
 */
+ (void)time:(NSUInteger)number block:(void(^)(NSString * time))block;
@end
